#include <cstdio>

static int max_traditional(int * array, int len){
  int result = array[0];
  for(int i = 1; i < len ; ++i){
    if(result < array[i] ){
      result = array[i];
    }
  }
  return result;
}

void test_max_traditional(){
  {
    int array[] = {0, 1, 2, 3};
    printf("max of array: %d\n",  max_traditional(array, sizeof(array)/sizeof(int)));
  }
  {
    int array[] = {4, 5, 7, 3};
    printf("max of array: %d\n",  max_traditional(array, sizeof(array)/sizeof(int)));
  }
}
